package fr.poy.mygluco.model;

import java.io.Serializable;
import java.util.Date;

import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.NotPersistent;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;
import javax.jdo.annotations.Unique;

import com.extjs.gxt.ui.client.data.BeanModelTag;

@PersistenceCapable//(detachable="true")//,identityType = IdentityType.APPLICATION)
@SuppressWarnings("serial")
public class UserProfile implements BeanModelTag, Serializable {

	@PrimaryKey
    @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY  )
	private Long id; 
	@Unique
	private String userEmail; 
	
	@NotPersistent
	private String userName;
	@NotPersistent
	private String logoffUrl;
	@NotPersistent
	private boolean firstuse=false;
 

	//-------------------------Format et unités
	private String timeZone;
	private String dayFormat;
	private String dateFormat;
	private String timeFormat;
	private String bgUnit;//unité glycémie
	
	//------------------------import
	private Date lastImport;//date dernier import
	
	//-------------------------Objectifs
	private Integer bgLow;
	private Integer bgHigh;
	private Integer limitHypo;
	//-------------------------journee et semaine plage horaire
	
	//-------------------------liste insuline
	
	//-------------------------liste dossiers med - labo
	//+ objectifs pour chaque types
	
	//-----xmpp
	 private String xmppPattern;
	
	public UserProfile() {
		super(); 
	} 
 
	public UserProfile(String userEmail, String userName) {
		super();
		this.userEmail = userEmail;
		this.userName = userName;
	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getUserEmail() {
		return userEmail;
	}

	public void setUserEmail(String userEmail) {
		this.userEmail = userEmail;
	}

	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	public String getDateFormat() {
		return dateFormat;
	}

	public void setDateFormat(String dateFormat) {
		this.dateFormat = dateFormat;
	}

	public String getTimeFormat() {
		return timeFormat;
	}

	public void setTimeFormat(String timeFormat) {
		this.timeFormat = timeFormat;
	}

	public String getBgUnit() {
		return bgUnit;
	}

	public void setBgUnit(String bgUnit) {
		this.bgUnit = bgUnit;
	}

	public Date getLastImport() {
		return lastImport;
	}

	public void setLastImport(Date lastImport) {
		this.lastImport = lastImport;
	}

	public Integer getBgLow() {
		return bgLow;
	}

	public void setBgLow(Integer bgLow) {
		this.bgLow = bgLow;
	}

	public Integer getBgHigh() {
		return bgHigh;
	}

	public void setBgHigh(Integer bgHigh) {
		this.bgHigh = bgHigh;
	}

	public Integer getLimitHypo() {
		return limitHypo;
	}

	public void setLimitHypo(Integer limitHypo) {
		this.limitHypo = limitHypo;
	}
	public String getLogoffUrl() {
		return logoffUrl;
	}

	public void setLogoffUrl(String logoffUrl) {
		this.logoffUrl = logoffUrl;
	}

	public String getDayFormat() {
		return dayFormat;
	}

	public void setDayFormat(String dayFormat) {
		this.dayFormat = dayFormat;
	}

	public boolean isFirstuse() {
		return firstuse;
	}

	public void setFirstuse(boolean firstuse) {
		this.firstuse = firstuse;
	}

	public String getXmppPattern() {
		return xmppPattern;
	}

	public void setXmppPattern(String xmppPattern) {
		this.xmppPattern = xmppPattern;
	}

	public String getTimeZone() {
		return timeZone;
	}

	public void setTimeZone(String timeZone) {
		this.timeZone = timeZone;
	}
	 

}
